<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/views/user/studentInfo.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="..\..\..\prettify.css" />
    <link rel="stylesheet" href="..\..\..\base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(..\..\..\sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="..\..\..\index.html">All files</a> / <a href="index.html">src/views/user</a> studentInfo.vue
    </h1>
    <div class='clearfix'>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;template&gt;
    &lt;div class="student-list"&gt;
        &lt;el-card&gt;
            &lt;el-form :inline="true" :model="formInline" class="demo-form-inline" size="small"&gt;
                &lt;el-form-item&gt;
                    &lt;el-button type="primary" @click="addStudent"&gt;新增&lt;/el-button&gt;
                &lt;/el-form-item&gt;
                &lt;el-form-item label="姓名"&gt;
                    &lt;el-input v-model="formInline.name" placeholder="姓名"&gt;&lt;/el-input&gt;
                &lt;/el-form-item&gt;
                &lt;el-form-item label="学号"&gt;
                    &lt;el-input v-model="formInline.number" placeholder="学号"&gt;&lt;/el-input&gt;
                &lt;/el-form-item&gt;
                &lt;el-form-item label="班级"&gt;
                    &lt;el-select v-model="formInline.region" placeholder="班级"&gt;
                    &lt;el-option label="框架9班" value="9"&gt;&lt;/el-option&gt;
                    &lt;el-option label="框架10班" value="10"&gt;&lt;/el-option&gt;
                    &lt;/el-select&gt;
                &lt;/el-form-item&gt;
                &lt;el-form-item&gt;
                    &lt;el-button type="primary" @click="onSubmit"&gt;查询&lt;/el-button&gt;
                &lt;/el-form-item&gt;
            &lt;/el-form&gt;
            &lt;el-table :data="tableData" border style="width: 100%"&gt;
                &lt;el-table-column align="center" prop="stuNum" label="学号"&gt;&lt;/el-table-column&gt;
                &lt;el-table-column align="center" prop="stuName" label="姓名"&gt;&lt;/el-table-column&gt;
                &lt;el-table-column align="center" prop="stuCollege" label="院系"&gt;&lt;/el-table-column&gt;
                &lt;el-table-column align="center" prop="stuMajor" label="专业"&gt;&lt;/el-table-column&gt;
                &lt;el-table-column align="center" prop="stuClass" label="班级"&gt;&lt;/el-table-column&gt;
                &lt;el-table-column align="center" prop="stuEntrace" label="入学"&gt;&lt;/el-table-column&gt;
                &lt;el-table-column align="center" prop="stuStatus" label="状态"&gt;&lt;/el-table-column&gt;
                &lt;el-table-column align="center" label="操作"&gt;
                    &lt;template slot-scope="scope"&gt;
                        &lt;el-button type="primary" size="mini" icon="el-icon-edit" @click="updateInfo(scope.row)"&gt;&lt;/el-button&gt;
                        &lt;el-button type="danger" size="mini" icon="el-icon-delete" @click="del"&gt;&lt;/el-button&gt;
                    &lt;/template&gt;
                &lt;/el-table-column&gt;
            &lt;/el-table&gt;
            &lt;!-- Table --&gt;
            &lt;el-dialog :title="state?'修改学生信息':'新增学生信息'" :visible.sync="dialogFormVisible" width="500px"&gt;
            &lt;el-form :model="form"&gt;
                &lt;el-form-item label="姓名" :label-width="formLabelWidth"&gt;
                    &lt;el-input v-model="form.name" autocomplete="off"&gt;&lt;/el-input&gt;
                &lt;/el-form-item&gt;
                &lt;el-form-item label="学号" :label-width="formLabelWidth"&gt;
                    &lt;el-input v-model="form.number" autocomplete="off"&gt;&lt;/el-input&gt;
                &lt;/el-form-item&gt;
                &lt;el-form-item label="年龄" :label-width="formLabelWidth"&gt;
                    &lt;el-input v-model="form.age" autocomplete="off"&gt;&lt;/el-input&gt;
                &lt;/el-form-item&gt;
                &lt;el-form-item label="性别" :label-width="formLabelWidth"&gt;
                    &lt;el-radio v-model="form.sex" label="1"&gt;男&lt;/el-radio&gt;
                    &lt;el-radio v-model="form.sex" label="2"&gt;女&lt;/el-radio&gt;
                &lt;/el-form-item&gt;
                &lt;el-form-item label="班级" :label-width="formLabelWidth"&gt;
                    &lt;el-select v-model="form.class" placeholder="请选择班级"&gt;
                        &lt;el-option label="一班" value="1"&gt;&lt;/el-option&gt;
                        &lt;el-option label="二班" value="2"&gt;&lt;/el-option&gt;
                        &lt;el-option label="三班" value="3"&gt;&lt;/el-option&gt;
                        &lt;el-option label="四班" value="4"&gt;&lt;/el-option&gt;
                        &lt;el-option label="五班" value="5"&gt;&lt;/el-option&gt;
                        &lt;el-option label="六班" value="6"&gt;&lt;/el-option&gt;
                        &lt;el-option label="七班" value="7"&gt;&lt;/el-option&gt;
                        &lt;el-option label="八班" value="8"&gt;&lt;/el-option&gt;
                        &lt;el-option label="九班" value="9"&gt;&lt;/el-option&gt;
                    &lt;/el-select&gt;
                &lt;/el-form-item&gt;
                &lt;el-form-item label="状态" :label-width="formLabelWidth"&gt;
                    &lt;el-input v-model="form.state" autocomplete="off"&gt;&lt;/el-input&gt;
                &lt;/el-form-item&gt;
                &lt;el-form-item label="地址" :label-width="formLabelWidth"&gt;
                    &lt;el-input v-model="form.address" autocomplete="off"&gt;&lt;/el-input&gt;
                &lt;/el-form-item&gt;
                &lt;el-form-item label="联系方式" :label-width="formLabelWidth"&gt;
                    &lt;el-input v-model="form.phone" autocomplete="off"&gt;&lt;/el-input&gt;
                &lt;/el-form-item&gt;
            &lt;/el-form&gt;
            &lt;div slot="footer" class="dialog-footer"&gt;
                &lt;el-button @click="dialogFormVisible = false"&gt;取 消&lt;/el-button&gt;
                &lt;el-button type="primary" @click="sure"&gt;确 定&lt;/el-button&gt;
            &lt;/div&gt;
            &lt;/el-dialog&gt;
            &lt;Page&gt;&lt;/Page&gt;
        &lt;/el-card&gt;
    &lt;/div&gt;
&lt;/template&gt;
&nbsp;
&lt;script&gt;
<span class="cstat-no" title="statement not covered" >import Page from "../../components/common/Pageing"</span>
<span class="cstat-no" title="statement not covered" >import { getStudentList} from "../../api/user";</span>
&nbsp;
export default {
    components:{
        Page,
    },
<span class="fstat-no" title="function not covered" >    data() {</span>
<span class="cstat-no" title="statement not covered" >        return {</span>
            formInline: {
                user: '',
                region: ''
            },
            tableData: [],
            dialogFormVisible: false,
            form: {},
            formLabelWidth: '80px',
            state:false
        }
    },
<span class="fstat-no" title="function not covered" >    created(){</span>
<span class="cstat-no" title="statement not covered" >        this.getStudentList()</span>
    },
    methods:{
<span class="fstat-no" title="function not covered" >        sure() {</span>
<span class="cstat-no" title="statement not covered" >            console.log(this.form)</span>
<span class="cstat-no" title="statement not covered" >            if(this.state) {</span>
                // 调用修改接口
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >                this.service</span></span>
                .put('http://rap2api.taobao.org/app/mock/281225/studentlist', this.form)
                .then(res =&gt; {
                    // if(res.data.status==='200'){
                    //     this.$message({
                    //         message:'修改成功',
                    //         type:'success',
                    //         duration:1000
                    //     })
                    //     localStorage.setItem('token',res.data.data.token)
                    //     localStorage.setItem('token',res.data.data.username)
                    // }else{
                    //     console.log(res.data.msg)
                    // }
                    // console.log(res.data.data)
<span class="fstat-no" title="function not covered" >                })</span>
                .catch(err =&gt; {
<span class="cstat-no" title="statement not covered" >                  console.log(err)</span>
                })
            } else {
                // 调用新增接口
                // this.service.post('接口地址', this.form)
                // .then(res =&gt; {
&nbsp;
                // })
                // .catch(err =&gt; {
                //   console.log(err)
                // })
            }
<span class="cstat-no" title="statement not covered" >            this.dialogFormVisible = false</span>
        },
<span class="fstat-no" title="function not covered" >        addStudent(){</span>
<span class="cstat-no" title="statement not covered" >            this.state=false</span>
<span class="cstat-no" title="statement not covered" >            this.form={</span>
                sex:'1'
            }
<span class="cstat-no" title="statement not covered" >            this.dialogFormVisible = true</span>
        },
<span class="fstat-no" title="function not covered" >        updateInfo(row){</span>
<span class="cstat-no" title="statement not covered" >            this.state=true</span>
<span class="cstat-no" title="statement not covered" >            this.form={...row}</span>
<span class="cstat-no" title="statement not covered" >            this.dialogFormVisible = true</span>
<span class="cstat-no" title="statement not covered" >            console.log(row)</span>
        },
<span class="fstat-no" title="function not covered" >        del(){</span>
<span class="cstat-no" title="statement not covered" >            this.$alert('您确定要删除吗？', '删除提示', {</span>
                confirmButtonText: '确定',
<span class="fstat-no" title="function not covered" >                callback: action =&gt; {</span>
                    //删除对应接口
                }
            })
        },
<span class="fstat-no" title="function not covered" >        onSubmit() {</span>
<span class="cstat-no" title="statement not covered" >            console.log('submit!');</span>
        },
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >        getStudentList(){</span></span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >            getStudentList().then(res=&gt;{</span></span>
<span class="cstat-no" title="statement not covered" >                this.tableData = res.data.list</span>
            })
        },
&nbsp;
    }
}
&lt;/script&gt;
&lt;style&gt;
.student-list{
    margin:20px 0;
}
.el-form{
    text-align: left;
}
.el-select{
    width: 100%;
}
&lt;/style&gt;
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Dec 14 2022 21:15:29 GMT+0800 (GMT+08:00)
</div>
</div>
<script src="..\..\..\prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="..\..\..\sorter.js"></script>
</body>
</html>
